/*
 * CS 567 GUI - Semester Project - "DecisionLists"
 * Jason Frank
 * Spring 2011
 *
 * This File:
 *
 */

package Decision_Lists;

import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Composite;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.JPanel;

/*
 */
public class Panel_Fader_User extends JPanel {


  Panel_Fader3 pf3;
  int colorVal = 0;  // for testing/debugging only
  int testRectX = 0;
  int testRectY = 0;

  // Constructor
  public Panel_Fader_User(JPanel target_panel, JPanel current_panel) throws Exception  {

    pf3 = new Panel_Fader3(target_panel, current_panel);

  } ////// end constructor //////

  public Panel_Fader_User() {
    
  }

  // This method basically is here since I can't get the right constructor (first one) called
  //  at the right time in the subclasses.
  public void init_PanelFaderUser(JPanel target_panel, JPanel current_panel) throws Exception  {

    pf3 = new Panel_Fader3(target_panel, current_panel);

  } ///////////


  @Override
  public final void paintComponent(Graphics g) {
    super.paintComponent(g);

    pf3.paint_caller_panel(g);


            /////////////////////////////////
            // TEMP. TODO: remove later - trying to get the paint to happen (it gets skipped on next item trans)
        //    Color savedColor = g.getColor();
        //    g.setColor(new Color(++colorVal % 256, ++colorVal % 256, ++colorVal % 256));
        //    g.fillRect(testRectX, testRectY, 15, 15);
        //    //g.fillRect(50, 50, 15, 15);
        //    g.setColor(savedColor);

  } //// end paintComponent() ///////




  public void setColorVal(int colorVal) {
    this.colorVal = colorVal;
  }

  public void setTestRectX(int testRectX) {
    this.testRectX = testRectX;
  }

  public void setTestRectY(int testRectY) {
    this.testRectY = testRectY;
  }








  /*
  @Override
  public Dimension getMinimumSize()   { return getPreferredSize(); }
  @Override
  public Dimension getPreferredSize() {
    return new Dimension(800, 800);
  }
  */

} //////////////////// end class Panel_Fader_User /////////////////////////////
